#include <stdio.h>
#include "testlib.h"
#include "gotplt.h"
#include "cyg-profile.h"

int
function1 (void)
{
  return 0;
}

int
function2 (void)
{
  return function1 () + 1;
}

int
function3 (void)
{
  return function2 () + 1;
}

int
main (void)
{
  cygprofile_setfilename("./cyglog.test");
  printf("Logfile: %s\n", cygprofile_getfilename ());
  cygprofile_enable(10);
  function3();
  function6();
  printf("Goodbye World\n");
  fprintf(stdout, "Goodbye World II\n");
  cygprofile_disable();
  dump_functions();
  return 0;
}
